﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SLBehaviourSystem
{

    public enum BehaviourNodeState
    {
        Idle,
        Running,
        Success,
        Failure,
    }

    public enum BehaviourInterruptType
    {
        None,
        InteruptRight,
        InteruptByChild,
        Both,
    }

    public enum BehaviourExcuteType
    {
        /// <summary>同步执行 </summary>
        Sync,
        /// <summary>异步执行 </summary>
        Async,
    }

    public enum BehaviourNodeType
    {
        Action=0,
        Condition=1,
        Composite=2,
        Decorator =3,
    }



    public partial class BehaviourNodeConfig
    {
        public static Dictionary<BehaviourNodeType, Dictionary<string,Type>> NodeDict = new Dictionary<BehaviourNodeType, Dictionary<string, Type>>()
        {
            {BehaviourNodeType.Action,BehaviourRuntimeNodeConfig.ActionNodeDict },
            {BehaviourNodeType.Condition,BehaviourRuntimeNodeConfig.ConditionNodeDict  },
            {BehaviourNodeType.Decorator,BehaviourRuntimeNodeConfig.DecoratorNodeDict  },
            {BehaviourNodeType.Composite,BehaviourRuntimeNodeConfig.CompositeNodeDict  },
        };
    }

    public partial class BehaviourComponentConfig
    {
        public static Dictionary<BehaviourNodeType, Dictionary<string, Type>> ComponentDict = new Dictionary<BehaviourNodeType, Dictionary<string, Type>>()
        {
            {BehaviourNodeType.Action,BehaviourRuntimeComponentConfig.ActionComponentDict },
            {BehaviourNodeType.Condition,BehaviourRuntimeComponentConfig.ConditionComponentDict  },
        };
    }

    public class BehaviourArgsType
    {
        public const string WaitTime = "WaitTime";
        public const string LoopCount = "LoopCount";

    }


}
